import request from '@/utils/request'

// 查询学校
export function schools() {
  return request({
    url: '/business/candidates/schools',
    method: 'get'
  })
}

// 查询班级
export function schoolClass() {
  return request({
    url: '/business/candidates/schoolClass',
    method: 'get'
  })
}

// 考试项目列表
export function examProjectsList() {
  return request({
    url: '/business/examProjects/list',
    method: 'get'
  })
}

// 考生列表
export function candidates(query) {
  return request({
    url: '/business/candidates',
    method: 'get',
    params: query
  })
}

// 考生考试成绩列表
export function examResultsList(query) {
  return request({
    url: '/business/examResults/list',
    method: 'get',
    params: query
  })
}

// 考生详情
export function candidatesDetail(id) {
  return request({
    url: '/business/candidates/' + id,
    method: 'get'
  })
}

// 修改考生信息
export function updateCandidate(data, id) {
  return request({
    url: '/business/candidates/' + id,
    method: 'put',
    data: data
  })
}

// 新增考生
export function addCandidate(data) {
  return request({
    url: '/business/candidates',
    method: 'post',
    data: data
  })
}

// 修改下载数量
export function print(query) {
  return request({
    url: '/business/candidates/print',
    method: 'get',
    params: query
  })
}

// 取消成绩
export function cancelResultStatus(id) {
  return request({
    url: '/business/examResults/cancelResultStatus/'+id,
    method: 'post',
  })
}

// 考试次数统计
export function examProjectCount(query) {
  return request({
    url: '/business/examResults/projectCountList',
    method: 'get',
    params: query
  })
}
// 考试次数统计 导出
export function examProjectCountExport(query) {
  return request({
    url: '/business/examResults/projectCountList/export',
    method: 'get',
    params: query
  })
}
